let ruleObj:any

ruleObj={
    phoneReg: {
        rule: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
        spaceTips: '电话号码',
        errorTips: '请输入正确的电话号码'
    }
}
export default (rule: any, value: any, callback: any) => {
    if(!value){
        return callback(new Error('请输入'+ruleObj[rule.valiType].spaceTips))
    }else {
        if(!ruleObj[rule.valiType].rule.test(value)){
            return callback(new Error(ruleObj[rule.valiType].errorTips))
        }else {
            callback()
        }
    }
}
